<?php
/**
 * 获取系统信息
 * Created by PhpStorm.
 * User: yhz
 * Date: 2017-12-22
 * Time: 23:43
 */

namespace tools;
use think\Db;

class Sysinfo
{
    //获取TL框架版本号
    public function getTladminVersion()
    {
        return config('tladmin.version');

    }

    //获取Thinkphp的版本号
    public function getThinkVersion()
    {
        return THINK_VERSION;
    }

    //获取服务器操作系统
    public function getServerOs()
    {
        return PHP_OS;
    }
    //获取Web运行环境
    public function getServerSoftware()
    {
        return $_SERVER['SERVER_SOFTWARE'];
    }
    //获取MYSQL版本
    public function getMysqlVersion()
    {
        $version = Db::query("select version() as ver");
        return $version[0]['ver'];
    }
    //获取PHP版本号
    public function getPHPVersion()
    {
        return PHP_VERSION;
    }

}